local ma__kuangbiao = fk.CreateSkill{
  name = "ma__kuangbiao"
}

Fk:loadTranslationTable{
  ["ma__kuangbiao"] = "狂飙",
  [":ma__kuangbiao"] = "当你使用【杀】对目标造成伤害后，你可以获得其手牌中的一张【杀】并使用之（无则改为获得随机一张手牌）。",

  ["#ma__kuangbiao"] = "狂飙：你可以获得 %dest 手牌中的一张【杀】并使用之",

  ["$ma__kuangbiao1"] = "",
  ["$ma__kuangbiao2"] = "",
}

ma__kuangbiao:addEffect(fk.Damage, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(ma__kuangbiao.name) and
      data.card and data.card.trueName == "slash" and player.room.logic:damageByCardEffect() and
      not data.to.dead and not data.to:isKongcheng()
  end,
  on_cost = function(self, event, target, player, data)
    local room = player.room
    if room:askToSkillInvoke(player, {
      skill_name = ma__kuangbiao.name,
      prompt = "#ma__kuangbiaod-invoke::"..data.to.id,
    }) then
      event:setCostData(self, {tos = {data.to}})
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local result = room:askToPoxi(player, {
      poxi_type = ma__kuangbiao.name,
      data = {
        { data.to.general, data.to:getCardIds("h") },
      },
      extra_data = {
        suit = data.card.suit,
      },
      cancelable = true,
    })
    if #result > 0 then
      room:obtainCard(player, result, true, fk.ReasonPrey, player, ma__kuangbiao.name)
    end
  end,
})


return ma__kuangbiao
